<script lang="tsx">
import {Component, Vue, Model} from 'vue-property-decorator'
import Child from "./Child.vue"

const symbol = Symbol('baz')


interface Props {
    checked: string;
}

@Component
export default class App extends Vue {

    abc = (prop: { value: string }, context: { color: string }) => (
        <Child {...{
            checked: false,
            "vOn:change": () => {
                console.log('dfdf')
            }
        }} />
    )

    render() {
        console.log()
        return (
            <div>
                {/*给子组件传递值这种*/}
                <Child props={{
                    checked: false,
                    "vOn:change": () => {
                        console.log('dfdf')
                    }
                }}/>
                {/*两种方式都可以*/}
                <Child {...{
                    checked: false,
                    "vOn:change": () => {
                        console.log('dfdf')
                    }
                }}/>
                <hr/>
            </div>
        )
    }
}
</script>

<style scoped>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
